package com.example.sugar.mapper;

import com.example.sugar.bean.ExamOne;
import com.example.sugar.bean.ExamTwo;
import com.example.sugar.bean.TrafficProvince;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProvinceStateMapper {

    @Select("select sum(user_Count) user_Count,sum(order_Count) order_Count,sum(order_amount) order_amount\n" +
            "from dws_trade_total_order_window; \n" +
            "WHERE toYYYYMMDD(stt) = #{date}")
    TrafficProvince selectAnswer(@Param("date") Integer date);

    @Select("select province_name,sum(user_Count) user_Count,sum(order_Count) order_Count,sum(order_amount) order_amount\n" +
            " from dws_trade_province_order_window\n" +
            "group by province_id; \n" +
            "WHERE toYYYYMMDD(stt) = #{date}")
    TrafficProvince selectAnswerAll(@Param("date") Integer date);
}
